﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Company.Sqlite.Models
{
    [Table(nameof(Data))]
    public class Data : EntityBase
    {
        private int userId;
        private int carId;
        private int stuffId;
        private int sendCompanyId;
        private int receiveCompanyId;
        private int transportCompanyId;

        public int UserId { get => userId; set => SetProperty(ref userId, value); }
        public int CarId { get => carId; set => SetProperty(ref carId, value); }
        public int StuffId { get => stuffId; set => SetProperty(ref stuffId, value); }
        public int SendCompanyId { get => sendCompanyId; set => SetProperty(ref sendCompanyId, value); }
        public int ReceiveCompanyId { get => receiveCompanyId; set => SetProperty(ref receiveCompanyId, value); }
        public int TransportCompanyId { get => transportCompanyId; set => SetProperty(ref transportCompanyId, value); }

        private string userName;
        private string carName;
        private string stuffName;
        private string sendCompanyName;
        private string receiveCompanyName;
        private string transportCompanyName;

        public string UserName { get => userName; set=> SetProperty(ref userName, value); }
        public string CarName { get => carName; set=> SetProperty(ref carName, value); }
        public string StuffName { get => stuffName; set=> SetProperty(ref stuffName, value); }
        public string SendCompanyName { get => sendCompanyName; set=> SetProperty(ref sendCompanyName, value); }
        public string ReceiveCompanyName { get => receiveCompanyName; set=> SetProperty(ref receiveCompanyName, value); }
        public string TransportCompanyName { get => transportCompanyName; set=> SetProperty(ref transportCompanyName, value); }

        private double mweight = 0;
        private double pweight = 0;
        private double kweight = 0;
        private double jweight = 0;

        /// <summary>
        /// 毛重
        /// </summary>
        public double Mweight { get => mweight; set => SetProperty(ref mweight, value); }
        /// <summary>
        /// 皮重
        /// </summary>
        public double Pweight { get => pweight; set => SetProperty(ref pweight, value); }
        /// <summary>
        /// 扣重
        /// </summary>
        public double Kweight { get => kweight; set => SetProperty(ref kweight, value); }
        /// <summary>
        /// 净重
        /// </summary>
        public double Jweight { get => jweight; set => SetProperty(ref jweight, value); }

        private double price = 0;
        private double sumPrice = 0;
        public double Price { get => price; set => SetProperty(ref price, value); }
        public double SumPrice { get => sumPrice; set => SetProperty(ref sumPrice, value); }

        private DateTime? mdate;
        private DateTime? pdate;
        /// <summary>
        /// 毛重日期
        /// </summary>
        public DateTime? Mdate { get => mdate; set => SetProperty(ref mdate, value); }
        /// <summary>
        /// 皮重日期
        /// </summary>
        public DateTime? Pdate { get => pdate; set => SetProperty(ref pdate, value); }

        private int scaleMode = 0;
        /// <summary>
        /// 称重模式
        /// </summary>
        public int ScaleMode { get => scaleMode; set => SetProperty(ref scaleMode, value); }

        private string transportMode;
        /// <summary>
        /// 运输模式：发货|收货|对外
        /// </summary>
        public string TransportMode { get => transportMode; set => SetProperty(ref transportMode, value); }

    }
}
